<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    @include('comm/layuiCommStyle')
    @include('comm/comm')
    <title>支付信息</title>
</head>
<body>

<div style="padding: 15px;">
    <blockquote class="layui-elem-quote">
        支付信息
    </blockquote>
</div>

<div class="">
    <blockquote class="layui-elem-quote layui-quote-nm">
        搜索:
    </blockquote>
    @foreach($res as $key=>$val)
    <form action="{{url('/admins/report/paying')}}" method="post">
        <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th><input type="checkbox" id="ids{{$key}}" name="delid" title="全选" lay-skin="primary" onclick="selsecAll(this,'ids{{$key}}')"></th>
            <th>id</th>
            <th>clickTime</th>
            <th>goodsTitle</th>
            <th>groupName</th>
            <th>commissionAmount</th>
            <th>orderStatus</th>
            <th>settlementTime</th>

        </tr>
        </thead>
        <tbody>
        @foreach ($val['data'] as $k=>$v)
            <tr>
                <td><input type="checkbox" class="ids{{$key}}" name="ids{{$key}}[]" value="{{ $v['id'] }}" lay-skin="primary"></td>
                <td>{{ $v['id']}}</td>
                <td>{{ $v['clickTime'] }}</td>
                <td>{{ $v['goodsTitle'] }}</td>
                <td>{{ $v['groupName'] }}</td>
                <td>{{ $v['commissionAmount'] }}</td>
                <td>{{ $v['orderStatus'] }}</td>
                <td>{{ $v['settlementTime'] }}</td>
            </tr>
        @endforeach
        <tr>

            <th></th>
            <th><input type="hidden" name="qunid" value="{{$key}}"></th>
            <th>合计:<span style="color: red;">{{$val['count']}}</span></th>
            <th>{{ csrf_field() }}</th>
            <th><button class="layui-btn" onclick="javascript:checkedAll('ids{{$key}}');return false;">全部选择</button></th>
            <th><button class="layui-btn" onclick="javascript:uncheckAll('ids{{$key}}');return false;">取消选择</button></th>
            <th><button class="layui-btn layui-btn-normal">支付选中</button></th>
            <th><button class="layui-btn">一键支付</button></th>
        </tr>
        </tbody>
    </table>
    </form>
    @endforeach
    <blockquote class="layui-elem-quote">
        支付的提示
    </blockquote>

</div>

</body>
<script>

    $(document).ready(function(){


    });

   function selsecAll(which,id)
   {
       if($(which).is(":checked"))
       {
           $("."+id).attr("checked",true);
       }
       else
       {
           $("."+id).attr("checked",false);
       }

   }
    function checkedAll(id)
    {
        //$("."+id).attr("checked",true);
        $("#"+id).click();
    }
    function uncheckAll(id)
    {
        //$("."+id).attr("checked",false);
        $("#"+id).click();
    }

</script>

</html>